package com.saicent.note.exception;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.ModelAndView;

public class HandlerExceptionResolverImpl implements HandlerExceptionResolver {

	private Log log = LogFactory.getLog(getClass());
	@Override
	public ModelAndView resolveException(HttpServletRequest request, 
			HttpServletResponse response, Object object, Exception exception) {
		log.error(exception.getMessage(), exception);
		return new ModelAndView("redirect:/menu");
	}

}
